#include "Rasengan.h"
#include "../../data/GameInfo.h"

Rasengan::Rasengan()
{
    SDL_Texture *texture = GameInfo::Instance().texturePool[TexId::TEX_RASENGAN];
    int hNum = 1, wNum = 4;
    std::vector<int> idxList;
    for (int j = 0; j < 10; j++) {
        for (size_t i = 0; i < hNum * wNum; i++) {
            idxList.emplace_back(i);
        }
    }
    skillMix = GameInfo::Instance().mixPool[MixId::MIX_RASENGAN];
    animation.SetFrameData(texture, hNum, wNum, {idxList});
    animation.isLoop = false;
    animation.onFinished = [this] { isValid = false; };
    animation.SetInterval(0.1);
    animation.texture = texture;
    shape.type = ShapeType::RECT;
    damage = 1;
    speed = 8;
    shape.w = 118;
    shape.h = 118;
    consume = 10;
    isOnce = false;
    needRotate = false;
}